<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.lkj.model.User" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp">
<title>华纵科技</title>
<link type="text/css" href="../../../bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="../../../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link type="text/css" href="../../../css/theme.css" rel="stylesheet">
<link type="text/css" href="../../../images/icons/css/font-awesome.css" rel="stylesheet">
<link type="text/css" href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600'rel='stylesheet'>
<script type="text/javascript">


</script>
</head>
<body class="kh-body">
    <%--头部开始--%>
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container" style="width: 90%;">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-collapse">
                    <i class="icon-reorder shaded"></i></a><a class="brand" href="index.html">视频分析及LKJ </a>
                <div class="nav-collapse collapse navbar-inverse-collapse">
                   <%-- <ul class="nav nav-icons">
                        <li class="active"><a href="#"><i class="icon-envelope"></i></a></li>
                        <li><a href="#"><i class="icon-eye-open"></i></a></li>
                        <li><a href="#"><i class="icon-bar-chart"></i></a></li>
                    </ul>
                    <form class="navbar-search pull-left input-append" action="#">
                        <input type="text" class="span3">
                        <button class="btn" type="button">
                            <i class="icon-search"></i>
                        </button>
                    </form>--%>
                    <ul class="nav pull-right">
                       <%-- <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Item No. 1</a></li>
                                <li><a href="#">Don't Click</a></li>
                                <li class="divider"></li>
                                <li class="nav-header">Example Header</li>
                                <li><a href="#">A Separated link</a></li>
                            </ul>
                        </li>--%>
                        <%   User user = (User) request.getSession().getAttribute("user");   %>
                        <li><a href="#"><%=user.getUsername()%></a></li>
                        <li class="nav-user dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="../../../images/user.png" class="nav-avatar">
                            <b class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">Your Profile</a></li>
                                <li><a href="#">Edit Profile</a></li>
                                <li><a href="#">Account Settings</a></li>
                                <li class="divider"></li>
                                <li><a href="#" onclick="logout()">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <!-- /.nav-collapse -->
            </div>
        </div>
        <!-- /navbar-inner -->
    </div>
    <%--头部结束--%>

    <div class="wrapper">
        <div class="container" style="width: 90%;">
            <div class="row">
                <%--导航区s--%>
                <div class="span3">
                    <div class="sidebar">
                        <ul class="widget widget-menu unstyled">
                            <li><a href="<%=request.getContextPath()%>/client/todayArrive"><i class="menu-icon icon-bold"></i> 今日到站 </a></li>
                            <li><a href="<%=request.getContextPath()%>/client/dataSummary"><i class="menu-icon icon-book"></i> 统计汇总 </a></li>
                            <li><a href="<%=request.getContextPath()%>/client/irregularities"><i class="menu-icon icon-paste"></i> 违规操作单 </a></li>
                        </ul><!--/.widget-nav-->
                    </div><!--/.sidebar-->
                </div>
                <%--导航区e--%>

                <div class="span9" style="width: 80%;">
                    <div class="content">
                        <div class="module">
                            <div class="module-head">
                                <h3>今日到站</h3>
                            </div>
                            <div class="module-body table">
                                <table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-bordered table-striped	 display" width="100%">
                                    <thead>
                                        <tr role="row">
                                            <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 202px;">序号</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 183px;">车次</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 114px;">起始站</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 79px;">进站时间</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 79px;">出站时间</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 79px;">司机</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 79px;">实习司机</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 79px;">违规次数</th>
                                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1"  style="width: 79px;">严重违规次数</th>
                                        </tr>
                                    </thead>

                                    <tfoot>
                                        <tr>
                                            <th rowspan="1" colspan="1"  style="width: 8%;">序号</th>
                                            <th rowspan="1" colspan="1"  style="width: 8%;">车次</th>
                                            <th rowspan="1" colspan="1"  style="width: 9%;">起始站</th>
                                            <th rowspan="1" colspan="1"  style="width: 9%;">进站时间</th>
                                            <th rowspan="1" colspan="1"  style="width: 9%;">出站时间</th>
                                            <th rowspan="1" colspan="1"  style="width: 7%;">司机</th>
                                            <th rowspan="1" colspan="1"  style="width: 7%;">实习司机</th>
                                            <th rowspan="1" colspan="1"  style="width: 5%;">违规次数</th>
                                            <th rowspan="1" colspan="1"  style="width: 8%;">严重违规次数</th>
                                        </tr>
                                    </tfoot>
                                    <tbody role="alert" aria-live="polite" id="tbody" aria-relevant="all">
                                        <%--<tr class="odd">
                                            <td >1</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="even">
                                            <td >2</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="odd">
                                            <td >3</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="even">
                                            <td >4</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="odd">
                                            <td >5</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="even">
                                            <td >6</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="odd">
                                            <td >7</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="even">
                                            <td >8</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="odd">
                                            <td >9</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="even">
                                            <td >10</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="odd">
                                            <td >11</td>
                                            <td >TEST001</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >123</td>
                                            <td >test1</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>
                                        <tr class="even">
                                            <td >12</td>
                                            <td >TEST002</td>
                                            <td >北京西 - 上海</td>
                                            <td >11:15:18</td>
                                            <td >11:15:30</td>
                                            <td >张三</td>
                                            <td >test123</td>
                                            <td >6</td>
                                            <td >2</td>
                                        </tr>--%>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</body>
<script src="../../../scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="../../../scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
<script src="../../../bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../../scripts/datatables/jquery.dataTables.js"></script>
<script src="../../../js/common.js"></script>
<script>
    $(document).ready(function() {
        $.post('<%=request.getContextPath()%>/client/getTrainInfo',{},function(data){
            var tbody = "";
            $.each(data.trains,function(index,entry){
                tbody +=
                    "<tr>"+
                        "<td >"+(index+1)+"</td>"+
                        "<td >"+entry.trainno+"</td>"+
                        "<td >"+entry.startstation+" - "+entry.endstation+"</td>"+
                        "<td >"+entry.startTime+"</td>"+
                        "<td >"+entry.endTime+"</td>"+
                        "<td >"+entry.driver+"</td>"+
                        "<td >"+entry.driver2+"</td>"+
                        "<td >"+entry.igtTotal+"</td>"+
                        "<td >"+entry.igtSerious+"</td>"+
                    "</tr>";
                    
            })
            $("#tbody").html(tbody);

            $('.datatable-1').dataTable();
            $('.dataTables_paginate').addClass("btn-group datatable-pagination");
            $('.dataTables_paginate > a').wrapInner('<span />');
            $('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left shaded"></i>');
            $('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right shaded"></i>');
        },'json');
    } );
</script>
</html>
